package acm.usa2000.midcentral;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/*
 * p1911
 * Mid-Central USA 2000
 */

public class p1911 {
	
	static String s;
	static Set<Character> set;

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		s = scanner.nextLine();
		
		set = new HashSet<Character>();
		set.add('a');
		set.add('e');
		set.add('i');
		set.add('o');
		set.add('u');
		
		while (s.compareTo("end") != 0) {
			
			if (containsVowel()) {
				if (meetRule2()) {
					if (meetRule3()) {
						System.out.println("<" + s + "> is acceptable.");
					}
					else {
						System.out.println("<" + s + "> is not acceptable.");
					}
				}
				else {
					System.out.println("<" + s + "> is not acceptable.");
				}
			}
			else {
				System.out.println("<" + s + "> is not acceptable.");
			}
			
			s = scanner.nextLine();
		}
	}

	private static boolean meetRule3() {
		int len = s.length();
		if (len >= 2) {
			for (int i=1;i<len;++i) {
				char c = s.charAt(i);
				char pc = s.charAt(i-1);
				if (c == pc) {
					if (c != 'e' && c != 'o') {
						return false;
					}
				}
			}
			return true;
		}
		else {
			return true;
		}
	}

	private static boolean meetRule2() {
		int len = s.length();
		if (len >= 3) {
			for (int i=2;i<len;++i) {
				char c = s.charAt(i);
				char pc = s.charAt(i-1);
				char ppc = s.charAt(i-2);
				if (set.contains(c) && set.contains(pc) && set.contains(ppc)) {
					return false;
				}
				else if (!set.contains(c) && !set.contains(pc) && !set.contains(ppc)) {
					return false;
				} 
			}
			return true;
		}
		else {
			return true;
		}
	}

	private static boolean containsVowel() {
		int len = s.length();
		for (int i=0;i<len;++i) {
			char c = s.charAt(i);
			if (set.contains(c)) {
				return true;
			}
		}
		return false;
	}

}
